import App from './App'

import auth from './util/auth.js'
import behavior from './util/behavior.js'
import cache from './util/cache.js'
import payment from './util/payment.js'
import helper from './util/helper.js'
import setting from './util/setting.js'

import authentication from './api/authentication.js'
import message from './api/message.js'
import transaction from './api/transaction.js'
import foundation from './api/foundation.js'
import examine from './api/examine.js'
import fund from './api/fund.js'
import supply from './api/supply.js'
import distribution from './api/distribution.js'
import schedule from './api/schedule.js'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false

Vue.prototype.$config = setting
Vue.prototype.$auth = auth
Vue.prototype.$fund = fund
Vue.prototype.$behavior = behavior
Vue.prototype.$cache = cache
Vue.prototype.$helper = helper

Vue.prototype.$authentication = authentication
Vue.prototype.$message = message
Vue.prototype.$distribution = distribution
Vue.prototype.$schedule = schedule
Vue.prototype.$transaction = transaction
Vue.prototype.$foundation = foundation
Vue.prototype.$supply = supply
Vue.prototype.$examine = examine

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif